import {currentSeckillSkuList, getSkuSeckillInfo} from '@/api/seckill/seckill'


const state = {
}

const mutations = {

}

const actions = {
  currentSeckillSkuList({ commit }) {
    return new Promise((resolve, reject) => {
      currentSeckillSkuList()
        .then(response => {
          resolve(response)
        }).catch(error => {
        reject(error)
      })
    })
  },
  getSkuSeckillInfo({ commit }, id) {
    return new Promise((resolve, reject) => {
      getSkuSeckillInfo(id)
        .then(response => {
          resolve(response)
        }).catch(error => {
        reject(error)
      })
    })
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
